﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ReportSystem_XY
{
    static class Program
    {

        

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Process[] processes = System.Diagnostics.Process.GetProcessesByName(Application.CompanyName);
            if(processes.Length > 1 ) {
                //MessageBox.Show("应用程序已经运行中");
                Thread.Sleep(1000);
                System.Environment.Exit(1);
            }
            else
            {
                Application.Run(new FrmMain());
            }
            
        }
    }
}
